<template>
    <div>
        <input :type="type" @input="inputChange" :value='value' :placeholder="placeholder" >
    </div>
</template>

<script>
export default {
    name: 'wgy-input',
    props:{
        value:'',
        type:{
            type:String,
            default:'text'
        },
        placeholder: {
            type:String,
            default:'请输入'
        }
    },
    data() {
        return {
        };
    },
    created() {
    },
    methods: {
        inputChange(e) {
            // 子传父。父组件input事件。把输入框 的内容实时传过去
            this.$emit('input',e.target.value)
        }

    },
    //组件挂载
    components: {},
    //计算属性
    computed: {},
    //过滤器
    filters: {},
};
</script>

<style lang="scss" scoped>

</style>
